using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace LocalizationTest
{
  public class DetectorMeasurement : Measurement
  {
    private bool somethingWasDetected;

    public DetectorMeasurement(bool somethingWasDetected, Sensor sensor)
    {
      this.somethingWasDetected = somethingWasDetected;
      this.sensor = sensor;
    }

    public bool SomethingWasDetected
    {
      get { return somethingWasDetected; }
    }

    public override double GetValueAsDouble()
    {
      if (somethingWasDetected) return 1;
      else return 0;
    }

    public override double GetDifference(Measurement other)
    {
      if (this.somethingWasDetected != ((DetectorMeasurement)other).somethingWasDetected) return 1;
      else return 0;
    }
    public override Measurement Parse(string str, Experiment experiment)
    {
      throw new Exception("The method or operation is not implemented.");
    }

    public override string ToString()
    {
      throw new Exception("The method or operation is not implemented.");
    }
  }
}
